package entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.io.Serializable;

/**
 * The type Return.
 */
public class Return extends Common implements Serializable {
    private static final long serialVersionUID = 858884284985260520L;
    @TableId(type = IdType.ID_WORKER_STR)
    private String id;

    /**
     * 商品id
     */
    private String pId;
    /**
     * 数量
     */
    private Integer quantity;
    /**
     * 费用
     */
    private Object cost;
    /**
     * 类型0为门店，1为供应商
     */
    private Integer type;
    /**
     * 时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "createTime")
    private Date createTime;
    /**
     * 订单编号
     */
    @TableField(value = "orderNum")
    private String orderNum;
    /**
     * 门店Id
     */
    @TableField(value = "storeId")
    private String storeId;
    /**
     * 供应商id
     */
    @TableField(value = "providerId")
    private String providerId;
    /**
     * 退货描述
     */
    private String description;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getpId() {
        return pId;
    }

    public void setpId(String pId) {
        this.pId = pId;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Object getCost() {
        return cost;
    }

    public void setCost(Object cost) {
        this.cost = cost;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public String getStoreId() {
        return storeId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public String getProviderId() {
        return providerId;
    }

    public void setProviderId(String providerId) {
        this.providerId = providerId;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * To string string.
     *
     * @return the string
     */
    @Override
    public String toString() {
        return "Return{" +
                "id='" + id + '\'' +
                ", pId='" + pId + '\'' +
                ", quantity=" + quantity +
                ", cost=" + cost +
                ", type=" + type +
                ", createTime=" + createTime +
                ", orderNum='" + orderNum + '\'' +
                ", storeId='" + storeId + '\'' +
                ", providerId='" + providerId + '\'' +
                ", description='" + description + '\'' +
                '}';
    }

    /**
     * Instantiates a new Return.
     *
     * @author overlook
     * @date 2022 -04-16 20:31:52
     */
    public Return() {
    }

    /**
     * Instantiates a new Return.
     *
     * @param id          the id
     * @param pId         the pId
     * @param quantity    the quantity
     * @param cost        the cost
     * @param type        the type
     * @param createTime  the create time
     * @param orderNum    the order num
     * @param storeId     the store id
     * @param providerId  the provider id
     * @param description the description
     * @author overlook
     * @date 2022 -04-16 20:31:52
     */
    public Return(String id, String pId, Integer quantity, Object cost, Integer type, Date createTime, String orderNum, String storeId, String providerId, String description) {
        this.id = id;
        this.pId = pId;
        this.quantity = quantity;
        this.cost = cost;
        this.type = type;
        this.createTime = createTime;
        this.orderNum = orderNum;
        this.storeId = storeId;
        this.providerId = providerId;
        this.description = description;
    }
}

